import request from '../utils/request'

export function login(data) {
    return request.post('/admin/login', data)
}
//分类列表
export function getCategoryList() {
    return request.get('/admin/category/list')
}
//分类详情
export function getCategory(params) {
    return request.get('/admin/category', { params })
}
//新增分类接口
export function addCategory(data) {
    return request.post('/admin/category/add', data)
}
//修改分类接口
export function editCategory(data) {
    return request.post('/admin/category/save', data)
}
// 删除分类接口
export function delCategory(data) {
    return request.post('/admin/category/del', data)
}
//上传文件
export function uploadPicture(data) {
    return request.post('/admin/upload/picture', data)
}